import 'dart:math';

import 'package:flutter/material.dart';

class RotateHomePage extends StatefulWidget {
  @override
  _RotateHomePageState createState() => _RotateHomePageState();
}

class _RotateHomePageState extends State<RotateHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('routateBox')),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [buildRotate()],
      ),
    );
  }

  buildTransform() {
    return Transform.rotate(
      angle: pi / 2,
      child: Container(
        color: Colors.grey,
        child: Text(
          "Transform",
          style: TextStyle(color: Colors.white),
        ),
      ),
    );
  }

  buildRotate() {
    return RotatedBox(
      quarterTurns: 3,
      child: Container(
        color: Colors.grey,
        child: Text(
          "Transform",
          style: TextStyle(color: Colors.white),
        ),
      ),
    );
  }
}
